package com.ruoyi.travel.service.impl;

import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.travel.domain.TravelReview;
import com.ruoyi.travel.mapper.TravelReviewMapper;
import com.ruoyi.travel.service.ITravelReviewService;

/**
 * 评价Service业务层处理
 * 
 * @author ruoyi
 */
@Service
public class TravelReviewServiceImpl implements ITravelReviewService
{
    @Autowired
    private TravelReviewMapper travelReviewMapper;

    @Override
    public TravelReview selectTravelReviewById(Long reviewId)
    {
        return travelReviewMapper.selectTravelReviewById(reviewId);
    }

    @Override
    public List<TravelReview> selectTravelReviewList(TravelReview travelReview)
    {
        return travelReviewMapper.selectTravelReviewList(travelReview);
    }

    @Override
    public List<TravelReview> selectTravelReviewListByProductId(Long productId)
    {
        return travelReviewMapper.selectTravelReviewListByProductId(productId);
    }

    @Override
    public Map<String, Object> selectTravelReviewStatsByProductId(Long productId)
    {
        return travelReviewMapper.selectTravelReviewStatsByProductId(productId);
    }

    @Override
    public int insertTravelReview(TravelReview travelReview)
    {
        return travelReviewMapper.insertTravelReview(travelReview);
    }

    @Override
    public int updateTravelReview(TravelReview travelReview)
    {
        return travelReviewMapper.updateTravelReview(travelReview);
    }

    @Override
    public int deleteTravelReviewById(Long reviewId)
    {
        return travelReviewMapper.deleteTravelReviewById(reviewId);
    }

    @Override
    public int deleteTravelReviewByIds(Long[] reviewIds)
    {
        return travelReviewMapper.deleteTravelReviewByIds(reviewIds);
    }
}

